package com.ldkj.panzh.controller;

import com.ldkj.panzh.domain.TableDataInfo;
import com.ldkj.panzh.param.CameraParam;
import com.ldkj.panzh.service.CameraService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 摄像头信息查询控制器
 *
 * @author qiancheng
 * @date 2025-11-21
 */
@Controller
public class CameraController extends BaseController {

    @Autowired
    private CameraService cameraService;

    /**
     * 查询摄像头所有在线信息
     * 接口地址: /api/resource/v1/cameras
     * 
     * @param param 查询参数
     * @return 摄像头信息列表
     * @throws Exception 处理过程中的异常
     */
    @RequestMapping("/api/resource/v1/cameras")
    @ResponseBody
    public TableDataInfo getCameraList(@RequestBody CameraParam param) throws Exception {
        return getDataTable(cameraService.getCameraList(param));
    }
}
